package com.railway.servlet;

import java.io.IOException;
import java.util.Map;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.railway.service.OrderService;
import com.railway.service.impl.OrderServiceImpl;
import com.railway.util.JSONUtil;

/**
 * Servlet implementation class OrderServlet
 */
/**预订订单返回订单id
 * @author 33676
 *
 */
@WebServlet("/OrderServlet.do")
public class OrderServlet extends HttpServlet {
	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		request.setCharacterEncoding("Utf-8");
		Map<String,String[]> data = request.getParameterMap();
		OrderService ods = new OrderServiceImpl();
		JSONUtil.responJSOn(response, ods.GenerateAnOrder(data));
	}

}
